<template>
  <van-tabbar v-model="active" :placeholder="true" :route="true" fixed>
    <van-tabbar-item v-for="(item, index) in tabbarData" :key="index" :icon="item.icon" :to="item.to">
      {{ item.title }}
    </van-tabbar-item>
  </van-tabbar>
</template>

<script setup lang="ts">
import { ref, reactive } from "vue";

const active = ref(0);
const tabbarData = reactive([
  {
    icon: "wap-home",
    title: "政策宣传",
    to: {
      name: "Home"
    }
  },
  {
    icon: "volume",
    title: "信息公开",
    to: {
      name: "Info"
    }
  },
  {
    icon: "youzan-shield",
    title: "业务受理",
    to: {
      name: "Zhufang"
    }
  },
  {
    icon: "service",
    title: "问题反馈",
    to: {
      name: "Question"
    }
  },
  // {
  //   icon: "contact",
  //   title: "我的",
  //   to: {
  //     name: "About"
  //   }
  // }
]);
</script>
